import 'dart:io';

import 'package:flutter/material.dart';

void main() {
  runApp(new OutLinePlugin());
}

/*
 * 线框按钮
 * FlatButton是扁平的，没有阴影的
 * RaisedButton是有阴影，看起来凸起来的
 * FloatingActionButton是在侧面浮起来的那种按钮 <br/>
 * 需要传入的键：<br/>
 * 传入的值类型： <br/>
 * 传入的值含义：<br/>
 * 是否必传 ：
 */
class OutLinePlugin extends StatefulWidget {
  State<StatefulWidget> createState() {
    return new OutLinePluginState();
  }
}

/*
 * 页面功能 <br/>
 */
class OutLinePluginState extends State<StatefulWidget> {
  final key_btn_right = GlobalKey();
  TextEditingController _unameController = new TextEditingController();
  TextEditingController _pwdController = new TextEditingController();

  void initState() {
    super.initState();
  }

  Widget build(BuildContext context) {
    AppBar appBar = AppBar(
      leading: new IconButton(
        icon: new Icon(Icons.arrow_back),
        onPressed: () {},
      ),
      title: new Text('FlutterDesign'),
      centerTitle: true,
      actions: <Widget>[
        new Container(width: 0, height: 0),
        new Container(width: 0, height: 0),
      ],
      backgroundColor: Colors.blue,
    );

    return MaterialApp(
      home: new Scaffold(
        appBar: appBar,
        body: new Builder(builder: (BuildContext context) {
          return Form(
            key: key_btn_right,
            child: Column(
              children: <Widget>[
                OutlineButton(
                  borderSide:
                      new BorderSide(color: Theme.of(context).primaryColor),
                  child: new Text(
                    '注册',
                    style: new TextStyle(color: Theme.of(context).primaryColor),
                  ),
                  onPressed: () {},
                )
              ],
            ),
          );
        }),
        backgroundColor: Colors.white,
        bottomNavigationBar: null,
      ),
    );
  }
}
